<?php


namespace BoojasrFramework\ServicesContainer\EventDispatcher;



/**
 * The EventDispatcherInterface is the central point of Symfony's event listener system.
 * Listeners are registered on the manager and events are dispatched through the
 * manager.
 *
 * @author Bernhard Schussek <bschussek@gmail.com>
 */
interface EventDispatcherInterface
{

    public function dispatch($eventName, Event $event = null);

    public function addListener($eventName, $listener, $priority = 0);

    public function addSubscriber(EventSubscriberInterface $subscriber);

    public function removeListener($eventName, $listener);

    public function removeSubscriber(EventSubscriberInterface $subscriber);

    public function getListeners($eventName = null);

    public function getListenerPriority($eventName, $listener);

    public function hasListeners($eventName = null);
}
